Mem fix in gtrnctr for last change.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 8 Jul 2013 00:24:58 +0000 (00:24 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 8 Jul 2013 00:24:58 +0000 (00:24 +0000)
gpsbabel/gtrnctr.cc

index 9d43fa3fc20afb38f2fe2ba06371502b578b8f09..ea1fce0e8585aeae2b4b935b828112ca0bac6940 100644 (file)
@@ -391,9 +391,10 @@ gtc_act_hdr(const route_head* rte)
   gtc_new_study_lap(rte);
   route_disp(rte, gtc_study_lap);
   if (gtc_least_time) {
-    const char* time_string = gtc_least_time.toPrettyString().toUtf8().data();
-    gtc_write_xml(0, "<Id>%s</Id>\n", time_string);
-    gtc_write_xml(1, "<Lap StartTime=\"%s\">\n", time_string);
+    gtc_write_xml(0, "<Id>%s</Id>\n", 
+                      gtc_least_time.toPrettyString().toUtf8().data());
+    gtc_write_xml(1, "<Lap StartTime=\"%s\">\n", 
+                      gtc_least_time.toPrettyString().toUtf8().data());
   } else {
     gtc_write_xml(1, "<Lap>\n");
   }